<template>
  <div class="app">
    <!-- <router-view v-slot="{ Component }">
      <keep-alive :include="cachedList">
        <component
          :is="Component"
          :key="$route.name"
          v-if="$route.meta.keepAlive"
        ></component>
      </keep-alive>
      <component
        :is="Component"
        :key="$route.name"
        v-if="!$route.meta.keepAlive"
      ></component>
    </router-view> -->

    <router-view></router-view>

    <!-- <keep-alive :include="cachedList">
      <router-view :key="$route.name" />
    </keep-alive> -->
  </div>
</template>

<script lang="ts">
import { computed, defineComponent } from 'vue'
import { useStore } from '@/store'

export default defineComponent({
  name: 'App',
  components: {},
  setup() {
    const store = useStore()
    const cachedList = computed(() => store.state.tag.cachedList)
    return { cachedList }
  }
})
</script>

<style>
/* #app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
} */

.app {
  height: 100%;
  width: 100%;
}
</style>
